In a moving bus, a passenger moves with the bus due to inertia of motion. As the driver applies brakes, the bus comes to rest. But, the passenger tries to maintain to inertia of motion. As a result, a forward force is exerted on him and the passenger leans forward.
Similarly, the passenger tends to fall backwards when the bus accelerates from rest because when the bus accelerates the inertia of rest of the passenger tends to oppose the forward motion of the bus. Hence, the passenger tends to fall backwards when the bus accelerates forward.