The grandma and the grandpa image is so pretty for me because a) there are naked old people jumping into a lake as if they were kids and b) the composition and the color scheme of the whole environment works perfectly with their naked bodies. When an image is pretty for me, it has to work within the composition, overall color scheme, and a story (if there is one).
This picture is so ugly because of the old fashioned gradient overlay that Instagram once had in the very beginning of stages of their app. It is interesting I consider it ugly because compared to the photo above, the only difference is the angle of the photo and the "filter" of the photo. It is also weird because at one point in my time, this filter was considered beautiful, unique and trendy but now it is considered ugly. When an image is ugly for me, it is when the colors do not complement one another at all and when the overall photo is confusing.