We present the Solar Bayesian Analysis Toolkit (SoBAT) which is a new easy to use tool for Bayesian analysis of observational data, including parameter inference and model comparison. SoBAT is aimed (but not limited) to be used for the analysis of solar observational data. We describe a new Interactive Data Language (IDL) code designed to facilitate the comparison of user-supplied model with data. Bayesian inference allows prior information to be taken into account. The use of Markov chain Monte Carlo (MCMC) sampling allows efficient exploration of large parameter spaces and provides reliable estimation of model parameters and their uncertainties. The Bayesian evidence for different models can be used for quantitative comparison. The code is tested to demonstrate its ability to accurately recover a variety of parameter probability distributions. Its application to practical problems is demonstrated using studies of the structure and oscillation of coronal loops.