A chain that falls off could be caused by a misalignment between the motor sprocket and the rear wheel sprocket. Both of these sprockets need to be in close to perfect alignment in order for the chain to stay on.
If the sprocket alignment is good then loose chain tension usually will not cause the chain too fall off unless the chain tension is extraordinarily loose. The chain tension should not bee too tight either or else that will cause the chain and sprockets, plus wheel and motor bearings to prematurely wear out. On electric scooters that have #25 chain there should be around 1/4 to 1/2 inch of play in the chain in order for it to have proper tension.
If the sprocket alignment is good and the chain tension is within specifications however the chain still falls off, then the chain and sprockets are worn out and will need to be replaced. When replacing these parts the chain and both sprockets should all be replaced at the same time with new parts. The reason for this is because if you put a new chain on old sprockets it might fall off when the scooter is being driven and it will wear out faster than normal. And if you install new sprockets and use the old chain then that could also cause the chain to fall off and the new sprockets will wear out faster than normal.
check the swing arm also and see if there are threaded holes for axle shaft keepers
Thanks for attaching the photo of your scooter. That is a Freedom brand dolphin body electric scooter. If your scooter had 12-1/2" wheels then I could be fairly sure what size sprockets and chain it uses however since it has 9" wheels I am not sure because that is a less common wheel size for those scooters.
To determine which sprockets your scooter has I recommend counting the number of teeth on the sprockets and then matching them with the #25 chain sprockets on this page: http://www.electricscooterparts.com/sprockets25chain.html
The chain that your scooter uses is #25 heavy-duty. The number of links that the old chain has will need to be counted in order to know what size replacement chain to purchase. Remember to count one chain link per space in the chain that a sprocket tooth goes into when counting the links. #25 heavy-duty chain sold by the link is available on this page: http://www.electricscooterparts.com/chain25.html
Please let me know if you have any questions.