Cricket has evolved drastically over the years since it was first started to be played. One of the major modern day changes is the scoring rates with which batsmen score their runs.
In olden days, uncovered pitches meant uneven bounce, which rendered the batsmen frightful to take any risks. Turfs these days are so batsmen-friendly that even a bad shot can sometimes fetch more runs than deserved.
The introduction of one-day cricket has played a significant role in the increasing scoring rates. Batsmen like Sanath Jayasuriya, Adam Gilchrist, Virender Sehwag etc. have revolutionized the way batting is approached today. This has had a direct effect on the approach taken by batsmen in Test cricket. Scoring rates of 4.0 RPO are quite mundane these days.
Does it all have to do with pitches? It's also the psychology of the batsmen that is a critical factor. Batsmen are hardly afraid to meet a faster head-on and stamp him over the top. They are even willing to take that extra risk to give a chance to scoring more runs, without compromising on traditional technique.
For an opener in Test cricket, it's important to have a balance between blocking and attacking, as the foundation is what the strength of the entire structure depends on. One has to respect unplayable deliveries, and not be rash. But on the other end, playing too defensively will only help in arousing the confidence in the bowlers.
A middle-order batsman in either form of the game should look to establish the innings, and be the pivotal force in guiding the side to a safe total. Rashness needs to be avoided, but then again, as per situation, taking risks should be decided upon.
Lower-order batsmen usually don't last long, but those with a decent technique can work to be better batsmen by improving their psychology. If you've got a decent technique, it pays to be patient initially and annoy the heck out of the opposition, before going for the attack. In case of those who've a rather miserable technique and no scope of improvement for the same, an all-out attack can work sometimes.