In order to say the Birkath Hahama (Blessing on the Sun) with Shem Umalkhuth (G-d's name) the Berakha (blessing) must be recited before the end of the third hour of the day (Sha'oth Zemanioth). If one missed that time, the blessing should be recited without G-d's name till midday.
There are those who say that the Berakha may be recited with G-d's name till noon. However, since there is a doubt about it we apply the concept of "Sefeq Berakhoth Lehaqel (where there is a doubt about a blessing it should not be recited) and do not say the blessing with G-d's name after the third hour. It should be noted that the Berakha of Sheheheyanu is not recited with the Birkath Hahamah (Blessing on the Sun).
In order to recite the blessing one must see the sun itself and not just its light or rays. Also it must not be seen through a cloud.
(See Ben Ish Hai, Shana Aleph, Parashath 'Eqeb, Oth Yod Teth)