This problem is caused by the implicit conversion to a string when you call double.Parse and then concatenate the result back into the sql text. This requires the compiler to represent the double value as a string and it will use the current culture to do the conversion. Of course the result is not what MySql expect to be a double value.
Moreover using string concatenation to build sql commands leads to Sql Injection hacks. A very nasty problem that you should avoid. Always.
So let's try to add some code to resolve these problems
 // A parameterized string without any concatenation from user input
 string lifeQuery = @"insert into lifeinsurance 
        values( null, @surname, @sum, @price)";
 MySqlCommand cmd = new MySqlCommand(lifeQuery, connection);
 // Add the parameters with value for each placeholder in string
 cmd.Parameters.AddWithValue("@surname", surname.Text + "." + pesel.Text);
 // Parse the user input as a double using the current culture to correctly
 // interpret the comma as decimal separator.
 // Note that here I have no check on the correctness of the input. If your
 // user cannot be trusted to type a valid double number then you should use
 // the double.TryParse approach separating these lines from the actual check
 cmd.Parameters.AddWithValue("@sum", double.Parse(lifeInsSumTB.Text, CultureInfo.CurrentCulture));
 cmd.Parameters.AddWithValue("@price", double.Parse(lifeInsPriceTB.Text, CultureInfo.CurrentCulture));
 cmd.ExecuteNonQuery();