Research shows that laughing has a definite social function, but it can also have an evolutionary function as a way of demonstrating harmless play to other human beings, showing that we are pretending to be friendly rather than dangerous.
Human beings are not the only animals that laugh; Monkeys are also known to laugh, especially in conditions that also make humans laugh, as a response to favor and a vocalization during play.
People tend to laugh mostly when they are around other people, although some people may occasionally laugh out loud while they are alone, and laughter is such a big part of human vocalization that most people have different laughs that use in different situations.
The use of different sounds of laughter in different settings is not necessarily an example of calculating, manipulative social affect. For example, a deep and genuine unbridled laugh can be considered socially unacceptable in some situations, so many people learn to soften their natural full-on laugh for use in situations where they are not comfortable. This is not necessarily a conscious choice, but it is something that many people do. Factors such as the global climate can influence how people laugh, and while some people’s laughter may appear to change characteristics and tone over time, science has shown that this is quite a normal change.