This is a good question to ask whenever thinking about a film with a historical setting. Most of these types of movies will take some liberties with historical accuracy in order to tell its story. With "Flags of Our Fathers," the filmmakers tried hard to stay true to the spirit of the times and events surrounding the story, while also telling a compelling narrative.
The shots of naval vessels and the chaos and carnage of the landings at Iwo Jima certainly resemble photos and videos from the actual event. The congestion and confusion of the Marines on the beach has received praise from veterans and historians for accurately capturing the events and feelings surrounding that event.
One criticism of historical accuracy is that images of rationing were not portrayed in scenes depicting the home-front. There seem to be plentiful sources of food and fuel, which was certainly not the case in the United States in 1945.