In this thesis, models for the dynamics of oxygen and organic matter in receiving waters (such as rivers and creeks), which are affected by rain, are developed. A time series analysis framework is used, but presented with special emphasis on continuous time state space models. Also, the concept of model identifiability is attended. For estimation of the parameters in the models the maximum likelihood method is used and the Kalman filter employed to evaluate the likelihood function. In the case of non-linear models, the extended Kalman filter is used. To evaluate the models, various residual analysis methods and model validation tools are employed. To develop the water quality model, including hydraulic relations and the states of oxygen and organic matter, the qualitative concepts of the physical, biological and chemical models are introduced. The model types used in this thesis are one-dimensional stochastic models. Most of the models are based on measurements from one measuring station, though models based on the linear reservoir description applied to measurements from two measuring stations are also considered. Both time varying and time invariant models are employed. In the models, the oxygen dynamic complex includes reaeration, photosynthesis, respiration and degradation of organic matter. The effect of pre-filtering data is investigated, as is various functions for photosynthesis as a function of solar radiation. For the degradation of organic matter delayed reactions have been studied. In most models, precipitation in the form of rain have been included to study the impact from this. Finally, the future and industrial perspectives are presented, along with a list of suggestions for future research related to the subjects considered in this thesis.