We describe a computer code that simulates how a satellite observes optical radiation emitted by a lightning flash after it is scattered within an intervening cloud. Our code, CloudScat.jl, is flexible, fully open source and specifically tailored to modern instruments such as the Modular Multispectral Imaging Array (MMIA) component of the Atmosphere–Space Interactions Monitor (ASIM) that operates from the International Space Station. In this article, we describe the algorithms implemented in the code and discuss several applications and examples, with an emphasis on the interpretation of MMIA data.